# coding:utf-8
# 原格式的文件要求为2行
sourceFile = open('g:/style_trans_validation.tsv', encoding='utf-8')  # 原来的txt
targetfile = open(r'g:/validation2.tsv', 'a', encoding='utf-8')  # 目标txt
for line in sourceFile:
    lines = line.strip().split("\t")
    # [::-1]将列表元素倒置，原句作为目标句
    result = '\t'.join(lines[::-1])
    targetfile.write(result)
    targetfile.write('\n')
    i = 0

sourceFile.close()
targetfile.close()
